package examination;

/**
 * @author Xiao
 * @date 2021/7/10
 */
public class Fruit {
    /**
     *      水果类
     */
    private String name;
    private int price;
    private String unit;
    public void show () {
        System.out.println("水果名称:" + name + "，价格为：" + price + "元，计价单位为：" + unit);
    }

    public Fruit() {
    }

    public Fruit(String name, int price, String unit) {
        this.name = name;
        this.price = price;
        this.unit = unit;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }
}
